{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Resize"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "%cd ../../..\n",
    "import set_env\n",
    "from d2py.utils.file import mkdir\n",
    "temp_dir = \".temp\"\n",
    "mkdir(temp_dir)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# import onnx\n",
    "# import tvm\n",
    "# from tvm import relay\n",
    "# # path = \"/media/pc/data/lxw/BaiduNetdiskDownload/电信N合一算法模型评估/product_models/vehicle/model2out/det_traffic/ultralytics/engine/model_pt/yolov8n-c3_384_640_.onnx\"\n",
    "# path = \"/media/pc/data/board/arria10/lxw/tasks/tools/npu_user_demos/models/telecom/vehile_det_traffic_yolov8n_c3/yolov8n-c3_384_640_.onnx\"\n",
    "# onnx_model = onnx.load(path)\n",
    "# mod, params = relay.frontend.from_onnx(onnx_model, {\"images\": (1, 3, 384, 640)}, freeze_params=True)\n",
    "# # with tvm.transform.PassContext(opt_level=3):\n",
    "# #     mod = relay.quantize.prerequisite_optimize(mod, params)\n",
    "# mod.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "xin",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
